package IO;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class PersonTest {
    public static void main(String[] args) throws IOException {
        Person p=new Person("张三",18,"男",new String[]{"中国","上海"});
        FileOutputStream fos=new FileOutputStream("Person.txt");
        byte[] data="张三，18，男，广州".getBytes(StandardCharsets.UTF_8);
        fos.write(data);
        System.out.println("写出完毕");
    }
}
